<template>
  <div>
    <!-- 头部 -->
    <div class="search_top">
      <div class="right">
        <span class="iconfont icon-sousuo"></span>
        <input type="text" placeholder="期待在以全世界" @keyup.enter="jump" />
      </div>
      <p @click="$router.go(-1)">取消</p>
    </div>

    <!-- 大家都在搜 -->
    <div class="search-title-bar">
      <p>大家都在搜</p>
    </div>

    <!-- 搜索选项 -->
    <div class="search-tags">
      <ul>
        <li>终极星卡师</li>
        <li>刚成仙神，子孙求我出山</li>
        <li>大医无疆</li>
        <li>全球降临：百倍奖励</li>
        <li>诸天刀皇</li>
        <li>女侠且慢</li>
        <li>这个训练家有亿点强</li>
        <li>重返2000：大国机长</li>
        <li>我成了女频修仙小说中的炮灰</li>
        <li @click="jump">不科学御兽</li>
        <li>龙族：从战锤归来的路明非</li>
      </ul>
    </div>

    <!-- 搜索历史 -->
    <div class="search-title-bar">
      <p>搜索历史</p>
      <p><span class="iconfont icon-shanchu"></span>清除</p>
    </div>

    <div class="search-tags">
      <ul>
        <li @click="jump">不科学御兽</li>
        <li @click="jump">不科学</li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    jump(event) {
      // console.log(event.target.value);
      let name = event.target.value;
      if (!name) {
        return;
      }
      this.$router.push({ path: "/search_details",query: {user:name} });
    },
  },
};
</script>

<style lang="scss" scoped>
// 搜索选项
.search-tags {
  ul {
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    li {
      padding: 6px;
      font-size: 13px;
      color: #969ba3;
      border: 1px solid #969ba3;
      margin: 0 4px 8px 0;
      border-radius: 16px;
    }
  }
}

// 大家都在搜
.search-title-bar {
  background-color: rgba(0, 0, 0, 0.03);
  height: 50px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  p {
    margin: 24px 0 0 15px;
    color: #969ba3;
    font-size: 13px;
    font-weight: 400;
    &:nth-child(2) {
      margin-right: 15px;
      display: flex;
      span {
        margin-right: 5px;
      }
    }
  }
}

// 头部
.search_top {
  display: flex;
  padding: 10px 15px;
  justify-content: space-between;
  align-items: center;
  .right {
    flex: 1;
    height: 32px;
    line-height: 32px;
    background-color: #f6f7f9;
    display: flex;
    align-items: center;
    border: 2px solid rgb(229, 151, 0);
    span {
      text-indent: 8px;
    }
    input {
      border: none;
      background-color: #f6f7f9;
      font-size: 14px;
      text-indent: 4px;
    }
  }
  p {
    font-size: 14px;
    margin-left: 15px;
  }
}
</style>
